package com.fuxi.cloud.dyndb.query;

import com.fuxi.cloud.common.util.oConvertUtils;

/**
 * MatchTypeEnum
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */

public enum MatchTypeEnum {
    AND("AND"),
    OR("OR");

    private String value;

    private MatchTypeEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    public static MatchTypeEnum getByValue(Object value) {
        return oConvertUtils.isEmpty(value) ? null : getByValue(value.toString());
    }

    public static MatchTypeEnum getByValue(String value) {
        if (oConvertUtils.isEmpty(value)) {
            return null;
        } else {
            MatchTypeEnum[] var1 = values();
            int var2 = var1.length;

            for(int var3 = 0; var3 < var2; ++var3) {
                MatchTypeEnum var4 = var1[var3];
                if (var4.getValue().toLowerCase().equals(value.toLowerCase())) {
                    return var4;
                }
            }

            return null;
        }
    }
}

